package com.yanqu.road.entity.activity.doublespring;

import com.yanqu.road.entity.activity.ActivityConfig;
import com.yanqu.road.entity.activity.ActivityInfo;
import com.yanqu.road.utils.property.Property;
import com.yanqu.road.utils.property.PropertyHelper;

import java.util.Map;

public class DoubleSpringActivityConfig {

    //活动信息
    private ActivityInfo activityInfo;

    //config配置
    private int EXCHANGE_SCORE_ITEM_ID;                      // 战令积分ID
    private int DOUBLE_SPRING_INVITE_LIMIT;                            // 发出邀请上限
    private int DOUBLE_SPRING_BE_INVITED_LIMIT;                            // 收到邀请上限
    private Property DOUBLE_SPRING_ITEM_COST;                            // 双人同行道具消耗数量（1连
    public DoubleSpringActivityConfig(ActivityInfo activityInfo, Map<String, ActivityConfig> activityConfigMap) {
        this.activityInfo = activityInfo;
        this.EXCHANGE_SCORE_ITEM_ID = activityConfigMap.get("EXCHANGE_SCORE_ITEM_ID").getIntValue();
        this.DOUBLE_SPRING_INVITE_LIMIT = activityConfigMap.get("DOUBLE_SPRING_INVITE_LIMIT").getIntValue();
        this.DOUBLE_SPRING_BE_INVITED_LIMIT = activityConfigMap.get("DOUBLE_SPRING_BE_INVITED_LIMIT").getIntValue();
        this.DOUBLE_SPRING_ITEM_COST = PropertyHelper.parseStringToProperty(activityConfigMap.get("DOUBLE_SPRING_ITEM_COST").getValue());
    }

    public ActivityInfo getActivityInfo() {
        return activityInfo;
    }

    public int getExchangeScoreItemId() {
        return EXCHANGE_SCORE_ITEM_ID;
    }

    public int getDoubleSpringInviteLimit() {
        return DOUBLE_SPRING_INVITE_LIMIT;
    }

    public int getDoubleSpringBeInvitedLimit() {
        return DOUBLE_SPRING_BE_INVITED_LIMIT;
    }

    public Property getDoubleSpringItemCost() {
        return DOUBLE_SPRING_ITEM_COST;
    }
}
